package com.feriki.msync.process.sink;

import com.alibaba.fastjson.JSONObject;
import com.feriki.msync.meta.MilvusCollectionMeta;
import com.feriki.msync.process.Handler;

import java.util.List;

/**
 * @author luozhida
 * @create 2024-07-04
 */
public abstract class SinkHandler extends Handler {

    private String policy;

    public SinkHandler(String sinkName,String type,String policy){
        super(sinkName,type);
        this.policy = policy;
    }

    public abstract boolean prepare(String source, MilvusCollectionMeta sourceMeta);
    public abstract long handler(String source,List<JSONObject> sourceJsonObjects);

    public String getPolicy() {
        return policy;
    }
}
